parser grammar TeradataSQLNonReservedWordsParser;

options {
    tokenVocab=TeradataSQLLexer;
}

nonreserved_word
    : ABORTSESSIONS
    | ABSENT
    | ACCESS
    | ACCORDING
    | ACCUMULATE
    | AG
    | AGGGEOMINTERSECTION
    | AGGGEOMUNION
    | ALLDBQL
    | ALLOCATE
    | ALLOCATION
    | ALLOW
    | ALLPARAMS
    | ALLTDWM
    | ALWAYS
    | AMPCOUNT
    | ANALYSIS
    | ANCHOR
    | ANCHOR_HOUR
    | ANCHOR_MILLISECOND
    | ANCHOR_MINUTE
    | ANCHOR_SECOND
    | APPLNAME
    | ARCHIVE
    | ARRAY
    | ARRAY_ADD
    | ARRAY_AGG
    | ARRAY_AVG
    | ARRAY_COMPARE
    | ARRAY_CONCAT
    | ARRAY_COUNT_DISTINCT
    | ARRAY_DIV
    | ARRAY_EQ
    | ARRAY_GE
    | ARRAY_GET
    | ARRAY_GT
    | ARRAY_LE
    | ARRAY_LT
    | ARRAY_MAX
    | ARRAY_MIN
    | ARRAY_MOD
    | ARRAY_MUL
    | ARRAY_NE
    | ARRAY_SUB
    | ARRAY_SUM
    | ARRAY_UPDATE
    | ARRAY_UPDATE_STRIDE
    | ASCII
    | ASSIGNMENT
    | ATTR
    | ATTRIBUTE
    | ATTRIBUTES
    | ATTRIBUTION
    | ATTRS
    | AUTH
    | AUTO
    | AUTOTEMP
    | AVRO
    | BIT_LENGTH
    | BITAND
    | BITNOT
    | BITOR
    | BITXOR
    | BLOCKCOMPRESSION
    | BLOCKCOMPRESSIONALGORITHM
    | BLOCKCOMPRESSIONLEVEL
    | BOM
    | BOTTOM
    | BSON
    | C
    | CALENDAR
    | CALLED
    | CALLER
    | CAMSET
    | CAMSET_L
    | CAPTURE
    | CARDINALITY
    | CEIL
    | CEILING
    | CHANGERATE
    | CHARACTERISTICS
    | CHARSET
    | CHARSET_COLL
    | CHECKSUM
    | CHR
    | CLASS_ORIGIN
    | CLICKLAG
    | CLIENT
    | CNT
    | COLOCATE
    | COLUMNMETA
    | COLUMNS
    | COLUMNSPERINDEX
    | COLUMNSPERJOININDEX
    | COMMAND_FUNCTION
    | COMMAND_FUNCTION_CODE
    | COMPARISON
    | COMPILE
    | CONCAT
    | CONCURRENT
    | CONDITION
    | CONDITION_IDENTIFIER
    | CONDITION_NUMBER
    | CONTAINED
    | CONTAINEDTOKEN
    | CONTENT
    | CONTIGUOUS
    | COST
    | COSTS
    | COUNTSET
    | CPP
    | CPUTIME
    | CPUTIMENORM
    | CREATEDATASET
    | CREATOR
    | CUME_DIST
    | CURDATE
    | CURTIME
    | DATA
    | DATASET
    | DAY_OF_CALENDAR
    | DAY_OF_MONTH
    | DAY_OF_WEEK
    | DAY_OF_YEAR
    | DAYNUMBER_OF_CALENDAR
    | DAYNUMBER_OF_MONTH
    | DAYNUMBER_OF_WEEK
    | DAYNUMBER_OF_YEAR
    | DAYOCCURRENCE_OF_MONTH
    | DBA
    | DBC
    | DEBUG
    | DECAMSET
    | DECAMSET_L
    | DECODE
    | DECOMPRESS
    | DEFINER
    | DELIMITER
    | DELTA_T
    | DEMOGRAPHICS
    | DENIALS
    | DENSE
    | DENSE_RANK
    | DESCRIBE
    | DETAILED
    | DIAGNOSTICS
    | DIGITS
    | DIMENSION
    | DOCUMENT
    | DOT
    | DOWN
    | DR
    | DUPCOUNT
    | DUPCOUNTCUM
    | EBCDIC
    | EDITDISTANCE
    | ELAPSEDSEC
    | ELAPSEDTIME
    | ELEMENT
    | ELZS_H
    | EMITNULL
    | EMPTY
    | EMPTY_BLOB
    | EMPTY_CLOB
    | ENCODE
    | ENCODING
    | ENCRYPT
    | ERRORS
    | ERRORTBL
    | EVENTCOLUMN
    | EXCEPTION
    | EXCL
    | EXCLUDE
    | EXCLUDING
    | EXCLUSIVE
    | EXPIRE
    | EXPORT
    | EXPORTWIDTH
    | FALSE
    | FEATUREINFO
    | FILE
    | FILL
    | FILTER
    | FINAL
    | FIRST_NOTNULL
    | FIRST_VALUE
    | FLOOR
    | FOLLOWING
    | FOREIGNFUNCTION
    | FORTOKEN
    | FRIDAY
    | FROM_BYTES
    | FUNCTIONPARAMETER
    | G
    | GETBIT
    | GETPSFVERSION
    | GETQUERYBAND
    | GETQUERYBANDVALUE
    | GETTIMEZONEDISPLACEMENT
    | GLOBAL
    | GLOP
    | GREATEST
    | HIGH
    | HOST
    | IDENTIFYDATABASE
    | IDENTIFYSESSION
    | IDENTIFYTABLE
    | IDENTIFYUSER
    | IFP
    | IGNORE
    | IMMEDIATELY
    | IMPORT
    | INCLUDE
    | INCLUDING
    | INCREMENT
    | INCREMENTAL
    | INDENT
    | INDEXESPERTABLE
    | INDEXMAINTMODE
    | INIT
    | INITCAP
    | INLINE
    | INSTANTIABLE
    | INSTR
    | INTERNAL
    | INVOKER
    | IOCOUNT
    | IPARTITION
    | ISOLATED
    | ISOLATION
    | JAVA
    | JIS_COLL
    | JSON
    | JSON_AGG
    | JSON_COMPOSE
    | K
    | KANJI1
    | KANJISJIS
    | KBYTE
    | KBYTES
    | KEEP
    | KILOBYTES
    | LAG
    | LAST
    | LAST_DAY
    | LAST_NOTNULL
    | LAST_VALUE
    | LATIN
    | LDIFF
    | LEAD
    | LEAST
    | LENGTH
    | LEVEL
    | LIST
    | LOAD
    | LOCATE
    | LOCKEDUSEREXPIRE
    | LOW
    | LPAD
    | LTRIM
    | LZCOMP
    | LZCOMP_L
    | LZDECOMP
    | LZDECOMP_L
    | M
    | MAD
    | MANUAL
    | MAPPING
    | MATCHED
    | MAX_CHOOSE
    | MAXCHAR
    | MAXINTERVALS
    | MAXLOGONATTEMPTS
    | MAXVALUE
    | MAXVALUELENGTH
    | MEDIAN
    | MEDIUM
    | MEETS
    | MEMBER
    | MERGEBLOCKRATIO
    | MESSAGE_LENGTH
    | MESSAGE_TEXT
    | MIN_CHOOSE
    | MINCHAR
    | MINVALUE
    | MODIFIED
    | MONDAY
    | MONITORQUERYBAND
    | MONITORSESSIONRATE
    | MONITORVERSION
    | MONTH_BEGIN
    | MONTH_END
    | MONTH_OF_CALENDAR
    | MONTH_OF_QUARTER
    | MONTH_OF_YEAR
    | MONTHNUMBER_OF_CALENDAR
    | MONTHNUMBER_OF_QUARTER
    | MONTHNUMBER_OF_YEAR
    | MONTHS_BETWEEN
    | MORE_
    | MULTINATIONAL
    | NAME
    | NAMESPACE
    | NEVER
    | NEXT_DAY
    | NGRAM
    | NIL
    | NODDLTEXT
    | NODE
    | NONOPTCOST
    | NONOPTINIT
    | NONSEQUENCED
    | NORIGHT
    | NOSEXTRACTVARFROMPATH
    | NOTATION
    | NOW
    | NPATH
    | NTH
    | NULLS
    | NUMFPFNS
    | NUMTODSINTERVAL
    | NUMTOYMINTERVAL
    | NVL
    | NVL2
    | NVP
    | OA
    | OADD_MONTHS
    | OCOUNT
    | ODELETE
    | OEXISTS
    | OEXTEND
    | OFIRST
    | OLAST
    | OLD_NEW_TABLE
    | OLIMIT
    | ONEXT
    | ONLINE
    | OPRIOR
    | OPTIONS
    | ORDERBYVALUES
    | ORDERED_ANALYTIC
    | ORDINALITY
    | OREPLACE
    | OTRANSLATE
    | OTRIM
    | OVERLAYS
    | OWNER
    | P_INTERSECT
    | P_NORMALIZE
    | PARAMID
    | PARAMINFO
    | PARENT
    | PARTITION
    | PARTITION_L
    | PARTITIONED
    | PARTITIONNAMES
    | PASS
    | PASSING
    | PATH_GENERATOR
    | PATH_START
    | PATH_SUMMARIZER
    | PATTERN
    | PERCENTILE
    | PERCENTILE_CONT
    | PERCENTILE_DISC
    | PERIOD
    | PIVOT
    | PORTION
    | POWER
    | PRECEDES
    | PRECEDING
    | PREFIX
    | PRINT
    | PRIOR
    | PROTECTED
    | QUARTER_BEGIN
    | QUARTER_END
    | QUARTER_OF_CALENDAR
    | QUARTER_OF_YEAR
    | QUARTERNUMBER_OF_CALENDAR
    | QUARTERNUMBER_OF_YEAR
    | QUERY
    | QUERY_BAND
    | QUOTECHAR
    | RANDOMIZED
    | RANGE
    | RANGE_L
    | RAPIDFIRE
    | RDIFF
    | READ
    | RECALC
    | REGEXP_INSTR
    | REGEXP_REPLACE
    | REGEXP_SIMILAR
    | REGEXP_SUBSTR
    | REPLACEMENT
    | RESET
    | RESPECT
    | RESTRICTWORDS
    | RETAIN
    | RETURNED_SQLSTATE
    | RETURNING
    | REUSE
    | ROOT
    | ROTATELEFT
    | ROTATERIGHT
    | ROUND
    | ROW_COUNT
    | ROWIDGEN
    | ROWIDGEN2
    | RPAD
    | RTRIM
    | RU
    | RULES
    | RULESET
    | SAMPLES
    | SATURDAY
    | SCHEMA
    | SCRIPT
    | SCRIPT_COMMAND
    | SEARCHSPACE
    | SEARCHUIFDBPATH
    | SECURITY
    | SEED
    | SELF
    | SEQ
    | SEQUENCE
    | SEQUENCED
    | SERIALIZABLE
    | SERVER
    | SESSIONIZE
    | SETBIT
    | SETRESOURCERATE
    | SETSESSIONACCOUNT
    | SETSESSIONRATE
    | SHARE
    | SHIFTLEFT
    | SHIFTRIGHT
    | SIGN
    | SIZE
    | SNAPPY_COMPRESS
    | SNAPPY_DECOMPRESS
    | SOURCE
    | SPARSE
    | SPECCHAR
    | SPL
    | SQLSTATE
    | SR
    | ST_GEOMETRY
    | STAT
    | STATIC
    | STATS
    | STATSUSAGE
    | STORAGE
    | STRIP
    | STRTOK
    | STYLE
    | SUBBITSTR
    | SUBCLASS_ORIGIN
    | SUCCEEDS
    | SUMMARYONLY
    | SUNDAY
    | SYMBOLS
    | SYSTEM
    | SYSTEM_TIME
    | SYSTEMTEST
    | TARGET
    | TD_ARRAY2P
    | TD_DATASET
    | TD_DAY_OF_CALENDAR
    | TD_DAY_OF_MONTH
    | TD_DAY_OF_WEEK
    | TD_DAY_OF_YEAR
    | TD_GENERAL
    | TD_GETTIMEBUCKET
    | TD_INTERNAL
    | TD_LZ_COMPRESS
    | TD_LZ_DECOMPRESS
    | TD_MONTH_OF_CALENDAR
    | TD_MONTH_OF_QUARTER
    | TD_MONTH_OF_YEAR
    | TD_QUARTER_OF_CALENDAR
    | TD_QUARTER_OF_YEAR
    | TD_TIME_BUCKET_NUMBER
    | TD_WEEK_OF_CALENDAR
    | TD_WEEK_OF_MONTH
    | TD_WEEK_OF_YEAR
    | TD_WEEKDAY_OF_MONTH
    | TD_YEAR_OF_CALENDAR
    | TDWMEVENT
    | TDWMEXCEPTION
    | TDWMHISTORY
    | TEMPORAL_DATE
    | TEMPORAL_TIMESTAMP
    | TEXT
    | THRESHOLDPERCENT
    | THROUGH
    | THURSDAY
    | TIES
    | TIMECODE
    | TIMECOLUMN
    | TIMEOUT
    | TIMESTAMPCOLUMN
    | TO_BYTE
    | TO_BYTES
    | TO_CHAR
    | TO_DATE
    | TO_DSINTERVAL
    | TO_NUMBER
    | TO_TIMESTAMP
    | TO_TIMESTAMP_TZ
    | TO_YMINTERVAL
    | TOTOKEN
    | TPA
    | TRANSACTION_ACTIVE
    | TRANSUNICODETOUTF8
    | TRANSUTF8TOUNICODE
    | TRUE
    | TRUNC
    | TRUST_ONLY
    | TTGRANULARITY
    | TUESDAY
    | UBJSON
    | UCASE
    | UDFSEARCHPATH
    | UNBOUNDED
    | UNCOMMITTED
    | UNICODE
    | UNKNOWN
    | UNPIVOT
    | USE
    | USECOUNT
    | UTILITYINFO
    | VARRAY
    | VERBOSE
    | VERSION
    | VERSIONING
    | WARNING
    | WEDNESDAY
    | WEEK_BEGIN
    | WEEK_END
    | WEEK_OF_CALENDAR
    | WEEK_OF_MONTH
    | WEEK_OF_YEAR
    | WEEKDAY_OF_MONTH
    | WEEKNUMBER_OF_CALENDAR
    | WEEKNUMBER_OF_MONTH
    | WEEKNUMBER_OF_QUARTER
    | WEEKNUMBER_OF_YEAR
    | WHITESPACE
    | WINDOWSIZE
    | WITHIN
    | WORKLOAD
    | WRITE
    | XML
    | XMLAGG
    | XMLATTRIBUTES
    | XMLCOMMENT
    | XMLCONCAT
    | XMLDECLARATION
    | XMLDOCUMENT
    | XMLELEMENT
    | XMLFOREST
    | XMLNAMESPACES
    | XMLPARSE
    | XMLPI
    | XMLQUERY
    | XMLSCHEMA
    | XMLSERIALIZE
    | XMLTABLE
    | XMLTEXT
    | XMLTYPE
    | XMLVALIDATE
    | YEAR_BEGIN
    | YEAR_END
    | YEAR_OF_CALENDAR
    | YEARNUMBER_OF_CALENDAR
    | ZLIB
    // extra non-reserved words
    | BUCKET
    | COMMITTED
    | CREATEXML
    | CS_LATIN
    | CS_UNICODE
    | CS_KANJISJIS
    | CS_GRAPHIC
    | CSV
    | CSVLD
    | DATASIZE
    | DAYOFMONTH
    | DAYS
    | DEFINITION
    | DELETED
    | FAST
    | LISTAGG
    | PATH
    | REGEXP_SPLIT_TO_TABLE
    | REVERSE
    | SAS
    | SQLTABLE
    | STRTOK_SPLIT_TO_TABLE
    | SYSLIB
    | SYSUDTLIB
    | TD_SERVER_DB
    | TD_SYSFNLIB
    | TD_SYSXML
    | TIMEDATEWZCONTROL
    | TRUST
    | TRYCAST
    | UDT
    | USAGE
    | VARIANT
    | WEEK
    | WIDTH
    | XMLPUBLISH
    | XMLPUBLISH_STREAM
    | XMLSPLIT
    | LATIN_TO_UNICODE
    | UNICODE_TO_LATIN
    | LOCALE_TO_UNICODE
    | UNICODE_TO_LOCALE
    | ASBSON
    | ASBSONTEXT
    | COMBINE
    | EXISTVALUE
    | JSONEXTRACT
    | JSONEXTRACTVALUE
    | JSONEXTRACTLARGEVALUE
    | KEYCOUNT
    | METADATA
    | STORAGE_SIZE
    | CREATESCHEMABASEDXML
    | CREATENONSCHEMABASEDXML
    | EXISTSNODE
    | ISCONTENT
    | ISDOCUMENT
    | ISSCHEMAVALID
    | ISSCHEMAVALIDATED
    | XMLEXTRACT
    | XMLTRANSFORM
    | PROC_ID
    | LOCATION
    | PAYLOAD
    | TRUSTED
    | PATHPATTERN
    | MANIFEST
    | ROWFORMAT
    | STOREDAS
    | HEADER
    | STRIP_EXTERIOR_SPACES
    | STRIP_ENCLOSING_CHAR
    | RLS
    | SINGLE
    | MULTIPLE
    | JSON_COMPRESS
    | JSON_DECOMPRESS
    | TS_COMPRESS
    | TS_DECOMPRESS
    | CONTIGUOUSMAPAMPS
    | SPARSEMAPAMPS
    | SPARSETABLEAMPS
    | UNNEST
    | CALCMATRIX
    | PHRASE
    | CALCTYPE
    | OUTPUT
    | NULL_HANDLING
    | READ_NOS
    | BUFFERSIZE
    | RETURNTYPE
    | SAMPLE_PERC
    | FULLSCAN
    | TD_UNPIVOT
    | VALUE_COLUMNS
    | UNPIVOT_COLUMN
    | COLUMN_LIST
    | COLUMN_ALIAS_LIST
    | INCLUDE_NULLS
    | WRITE_NOS
    | NAMING
    | MANIFESTFILE
    | MANIFESTONLY
    | OVERWRITE
    | INCLUDE_ORDERING
    | INCLUDE_HASHBY
    | MAXOBJECTSIZE
    | COMPRESSION
    | ARRAY_TO_JSON
    | BSON_CHECK
    | GEOJSONFROMGEOM
    | GEOMFROMGEOJSON
    | JSON_CHECK
    | JSONGETVALUE
    | JSONMETADATA
    | NVP2JSON
    | TD_JSONSHRED
    | JSON_KEYS
    | JSON_TABLE
    | DEPTH
    | QUOTES
    | ROWEXPR
    | COLEXPR
    | RETURNTYPES
    | NOCASE
    | TRUNCATE
    | LINK
    ;
